#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void exchange(int* a, int* b)
{
	int tmp = 0;
	tmp = *a;
	*a = *b;
	*b = tmp;
}

void sort(int* a, int len)
{
	int cur = 0;
	for (int i = 0; i < len; i++)
	{
		if (a[i] % 2 != 0)
		{
			exchange(&a[cur], &a[i]);
			cur++;
		}
	}
}

int main()
{
	int arr[10] = { 0 };
	for (int i = 0; i < 10; i++)
	{
		scanf("%d", &arr[i]);
	}
	sort(arr, 10);
	for (int i = 0; i < 10; i++)
	{
		printf("%d ", arr[i]);
	}
}